// `parent` is needed to poll the asynchronous operations but its available only on the policy.

policyUrl := fmt.Sprintf("{{ComputeBasePath}}%s", d.Get("policy_id"))
url, err = replaceVars(d, config, policyUrl)
if err != nil {
	return err
}

policyRes, err := sendRequest(config, "GET", "", url, userAgent, nil)
if err != nil {
	return handleNotFoundError(err, d, fmt.Sprintf("ComputeOrganizationSecurityPolicy %q", d.Get("policy_id")))
}

parent := flattenComputeOrganizationSecurityPolicyParent(policyRes["parent"], d, config)
var opRes map[string]interface{}
err = computeOrgOperationWaitTimeWithResponse(
	config, res, &opRes, parent.(string), "Creating OrganizationSecurityPolicyRule", userAgent,
	d.Timeout(schema.TimeoutCreate))

if err != nil {
	// The resource didn't actually create
	d.SetId("")
	return fmt.Errorf("Error waiting to create OrganizationSecurityPolicyRule: %s", err)
}
